pub fn new_birthday_probability(n: u32) -> f64 {
    if n > 365 {
        return 1.0; // 如果人数超过365人，必然有两人生日相同
    }

    let mut probability_all_different = 1.0;

    // 计算所有人生日都不同的概率
    for i in 0..n {
        probability_all_different *= (365 - i) as f64 / 365.0;
    }

    // 至少两人生日相同的概率
    let probability_at_least_two_same = 1.0 - probability_all_different;

    // 返回结果，保留四位小数
    (probability_at_least_two_same * 10000.0).round() / 10000.0
}